#ifndef QTPIXMAPSPRITE_H
#define QTPIXMAPSPRITE_H

#include "QtSprite.h"

class QtPixmapSprite: public QtSprite
{
public:
	QtPixmapSprite(QtSprite *parent = 0);
	~QtPixmapSprite();

	void SetPixmap(const QPixmap& tile);

	void SetWidth(unsigned int width);
	void SetHeight(unsigned int height);

	void SetTiled(bool enabled);
	void SetPixmapOffset(const QPoint& offset);
	const QPoint& PixmapOffset() const;

protected:
	QRectF boundingRect() const;
	QPainterPath shape() const;
	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

private:
	QPainterPath shapepath;
	QRect bounds;
	QPixmap pixmap;

	bool autocenter;
	bool tiled;
	QPoint pixmapOffset;
};

#endif //QTPIXMAPSPRITE_H